-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example doc folder for writing and testing a Mill plugin #3416
Conversation
This is still WIP but it could use a first pass review |
Merging this first to avoid the PR snowballing larger, @lefou feel free to review |
Can't review in detail right now, but writing down some ad-hoc thoughts. As for any other project, Mill plugins should declare minimal dependencies. Depending on They should also depend on the lowest version they want to support, this is typically the To avoid bringing incompatible or duplicate entries to the classpath, they should declare Mill dependencies as The integration testing should IMHO also happen against multiple Mill versions. At least the minimal version and ideally more recent versions. And since we try to evolve a stable environment, it's a good idea to prepare a Mill plugin project for cross-compilation against multiple Mill versions from the beginning. It's always a bit harder to add that later. When there is a nice and simple template which prepares that, it makes later support for multiple versions easier. Why is that necessary? Because a good build tool needs to address not only small hobby projects, but larger commercial projects that have various reasons to not upgrade their tooling any other day. Also, you can't make large changes in maintenance branches. Also, we already use the |
Does this really matter since Mill is always distributed as
Can probably be done. Not super familiar with Mill cross versioning, so @lefou you may need to be the one adding it here. Like do we have to add
AFAIK we only use |
Yes, it matters.
About the classpath filtering. We don't have an effective way currently. We tried to hack something to mitigate some issues due to mill bootstrap builds using a Once we change details in how we build mill project files we risk to run into issue. E.g. if we expect less dependencies on the classpath, they can still slip in via too coarsely defined transitive dependencies.
The Beside that, it's mostly the
|
Oh, I totally missed, that |
Most of the interesting stuff is in
example/extending/plugins/7-writing-mill-plugins/build.sc
. It's a simple example build for a Mill plugin that has unit, integration, and example testsI did some unrelated refactoring as part of this PR, to try and reduce the messiness of the example folder and make it better match the current docsite, and some cleanup in the
build.sc
that was necessary to make the example test pass (e.g.dev.*
is nowdist.*
)